{% extends "base.html" %}
{% block title %}| Boost - {{game.name}}{% endblock %}

{% block body %}

<center><h2>Boost do jogo - {{ game.name }}</h2><center>

<table>
	<tr>
		<th width=100> Criador </th>
		<th width=100> Nome </th>
		<th width=100> Descricao </th>
		<th> Inscricao ? </th>
		<th> Data </th>
	</tr>
{% for boost in boost_db %}
	<tr height=30><td><img class="meio" src="{{boost.creator.pic_url}}" height=20> <a class="meio" href="/rank/{{boost.creator}}">{{ boost.creator}} </a></td>
		 <td><a href="./{{ boost.name }}"> {{boost.name}} </a> </td> <td> {{ boost.short_desc }} </td>
		<td align="center"> {% if boost.subscribe %} sim {% else %} nao {% endif %}  </td>
		<td> {{ boost.date|date:"d-m-y H:i:s" }} </td>
 </tr>
{% endfor %}
</table>

<br/>

{% ifequal user.auth.username 'fabriciols' %}
<form method="post" action=".">{% csrf_token %}
	{{ boost_formset.management_form }}
   <table>
        <tr> <th colspan=7> Boost - {{ game.name }}</th> </tr>
        <tr> <th> Criador </th> <th> Nome </th> <th> Descricao </th> <th> Descricao (curta) </th>
				 <th> Regras </th> <th> Inscricao ? </th> <th> Apagar </th></tr>
    {% for form in boost_formset.forms %}
         <tr>
         {% for field in form.visible_fields %}
            <td>

            {% if forloop.first %}
               {% for hidden in form.hidden_fields %}
                  {{ hidden }}
               {% endfor %}
            {% endif %}
            {{ field }}
            </td>

         {% endfor %}
         </tr>

    {% endfor %}

   <tr><td colspan=7 align="center"> <input type="submit" value="Submit"></td></tr>
   </table>

</form>

{% endifequal %}

<br/><br/>

{% endblock %}
